{include file='common/head.html'}

<div class="layui-body">
	<div class="layui-tab layui-tab-brief" lay-filter="tab">
	  <ul class="layui-tab-title">
	    <li class="layui-this" lay-id="t1">基本配置</li>
	    <li  lay-id="t2">邮件通知</li>
	    <li  lay-id="t3">百度接口</li>
	    <li  lay-id="t4">WebAPI</li>
	    <li  lay-id="t5">图片水印</li>
	    <li  lay-id="t6">安全配置</li>
	  </ul>
		  <div class="layui-tab-content">
		  	   <div class="layui-tab-item layui-show">
		  	   	   <form action="{url./admin/Config/index}" method="post" class="layui-form">
			  	   	   <input type="hidden" name="formcheck" value="{$formcheck}" > 
		                
		  	   		 	<div class="layui-form-item">
		                     <label class="layui-form-label">独立手机版</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="open_wap" value="1" {if([$configs.open_wap.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="open_wap" value="0" {if([$configs.open_wap.value]==0)} checked="checked" {/if} title="禁用">
								<span class="layui-icon layui-icon-about tips" data-content="使用响应式模板的用户请不要开启！"></span>
		                     </div>
		                </div>
		                
		                 <div class="layui-form-item">
		                     <label class="layui-form-label">手机版域名绑定</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="wap_domain"  value="{$configs.wap_domain.value}" placeholder="如：m.pbootcms.com"  class="layui-input">
		                     </div>
		                </div>

		                <div class="layui-form-item">
		                     <label class="layui-form-label">伪静态开关</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="url_type" value="2" {if([$configs.url_type.value]==2)} checked="checked" {/if} title="启用">
								<input type="radio" name="url_type" value="1" {if([$configs.url_type.value]==1)} checked="checked" {/if} title="禁用">
								<span class="layui-icon layui-icon-about tips" data-content="此功能需要服务器环境的支持！"></span>
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">前端静态缓存</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="tpl_html_cache" value="1" {if([$configs.tpl_html_cache.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="tpl_html_cache" value="0" {if([$configs.tpl_html_cache.value]==0)} checked="checked" {/if} title="禁用">
		                     	<span class="layui-icon layui-icon-about tips" data-content="本功能效果接近生成静态，开启后将提高前端访问速度及并发能力！"></span>
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">缓存有效期(秒)</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="tpl_html_cache_time"  value="{$configs.tpl_html_cache_time.value}" placeholder="请输入缓存有效期（秒）"  class="layui-input">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">Gzip页面压缩</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="gzip" value="1" {if([$configs.gzip.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="gzip" value="0" {if([$configs.gzip.value]==0)} checked="checked" {/if} title="禁用">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">会话文件路径</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="session_in_sitepath" value="1" {if([$configs.session_in_sitepath.value]==1)} checked="checked" {/if} title="站内">
								<input type="radio" name="session_in_sitepath" value="0" {if([$configs.session_in_sitepath.value]==0)} checked="checked" {/if} title="系统">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">分页数字条数量</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="pagenum"  value="{$configs.pagenum.value}" placeholder="请输入前端分页数字条显示数量"  class="layui-input">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">内链替换次数</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="content_tags_replace_num"  value="{$configs.content_tags_replace_num.value}" placeholder="请输入文章内链替换次数，默认3次"  class="layui-input">
		                     </div>
		                </div>
		                
		                {if(![$configs.sn_user.value])}
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">系统授权码</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="sn"  value="{$configs.sn.value}" placeholder="请输入授权码，多个授权码用逗号隔开"  class="layui-input">
		                     </div>
		                </div>
		                
		                 <div class="layui-form-item">
		                     <label class="layui-form-label">授权码手机</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="sn_user"  value="{$configs.sn_user.value}" placeholder="请购买了万能授权码的用户填写"  class="layui-input">
		                     </div>
		                </div>
		                
		                {/if}
		                
		                <div class="layui-form-item">
							 <div class="layui-input-block">
							    <button class="layui-btn" lay-submit name="submit" value="basic">立即提交</button>
							    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
							 </div>
						</div>
	              </form>
		  	   </div>
		  	   
		  	   <div class="layui-tab-item">
		  	   	   <form action="{url./admin/Config/index}" method="post" class="layui-form">
			  	   	    <input type="hidden" name="formcheck" value="{$formcheck}" > 
		                
		                <div class="layui-form-item">
			                   <label class="layui-form-label">服务器状态 </label>
			                   <div class="layui-input-block" style="line-height:36px;">
									stream_socket_client函数<i class="layui-icon layui-icon-ok-circle" style="color: {php}echo function_exists('stream_socket_client')?'#5FB878':'#f2f2f2';{/php}"></i>&nbsp;&nbsp;&nbsp; 
									fsockopen函数 <i class="layui-icon layui-icon-ok-circle" style="color: {php}echo function_exists('fsockopen')?'#5FB878':'#f2f2f2';{/php}"></i>
									<span class="layui-icon layui-icon-about tips" data-content="至少需要支持其中一个函数才能正常使用！"></span>
			                   </div>
			             </div>
			             
			 	   		<div class="layui-form-item">
			                    <label class="layui-form-label">SMTP服务器</label>
			                   <div class="layui-input-inline">
			                   	<input type="text" name="smtp_server" value="{$configs.smtp_server.value}" placeholder="请输入SMTP服务器" class="layui-input">
			                   </div>
			             </div>
				  	   
			
			  	   		<div class="layui-form-item">
			                    <label class="layui-form-label">SMTP端口</label>
			                   <div class="layui-input-inline">
			                   	<input type="text" name="smtp_port" value="{$configs.smtp_port.value}" placeholder="请输入SMTP端口,一般SSL为465，普通为25" class="layui-input">
			                   </div>
			             </div>
				  	   
				  	    <div class="layui-form-item">
			                <label class="layui-form-label">是否为SSL</label>
			                <div class="layui-input-block">
			                   	<input type="radio" name="smtp_ssl" value="1" {if([$configs.smtp_ssl.value]==1)} checked="checked" {/if} title="是">
								<input type="radio" name="smtp_ssl" value="0" {if([$configs.smtp_ssl.value]==0)} checked="checked" {/if} title="否">
			           		</div>
			           </div>
			           
			   			<div class="layui-form-item">
			                  <label class="layui-form-label">邮箱账号</label>
			                 <div class="layui-input-inline">
			                 	<input type="text" name="smtp_username"  value="{$configs.smtp_username.value}" placeholder="请输入邮箱账号" class="layui-input">
			                 </div>
			            </div>
			   
			   			<div class="layui-form-item">
			                  <label class="layui-form-label">邮箱密码</label>
			                 <div class="layui-input-inline">
			                 	<input type="password" name="smtp_password" value="{$configs.smtp_password.value}" placeholder="请输入邮箱密码或邮箱授权码" class="layui-input">
			                 </div>
			            </div>
			            
						<div class="layui-form-item">
			                  <label class="layui-form-label">测试账号</label>
			                 <div class="layui-input-inline">
			                 	<input type="text" name="smtp_username_test" id="smtp_username_test" value="{$configs.smtp_username_test.value}" placeholder="请输入用于接受测试邮件的账号" class="layui-input">
			                 </div>
			            </div>
		            
		                <div class="layui-form-item">
		                     <label class="layui-form-label">留言发送邮件</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="message_send_mail" value="1" {if([$configs.message_send_mail.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="message_send_mail" value="0" {if([$configs.message_send_mail.value]==0)} checked="checked" {/if} title="禁用">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">表单发送邮件</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="form_send_mail" value="1" {if([$configs.form_send_mail.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="form_send_mail" value="0" {if([$configs.form_send_mail.value]==0)} checked="checked" {/if} title="禁用">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">信息接收邮箱</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="message_send_to"  value="{$configs.message_send_to.value}" placeholder="请输入留言接收邮箱"  class="layui-input">
		                     </div>
		                </div>
		                
						 <div class="layui-form-item">
							 <div class="layui-input-block">
							    <button class="layui-btn" lay-submit name="submit" value="email">立即提交</button>
							    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
							    <a href="{url./admin/Config/index/action/sendemail}" onclick="return sendtest(this,'#smtp_username_test')" class="layui-btn layui-btn-primary">发送测试邮件</a>
							 </div>
						</div>
						<script>
					    	function sendtest(obj,to){
					    		$(obj).attr('href',$(obj).attr('href')+'?to='+$(to).val()); 
					    		return true;
					    	}
					    </script>
	              </form>
		  	   </div>
		  	   
		  	   <div class="layui-tab-item">
		  	   	   <form action="{url./admin/Config/index}" method="post" class="layui-form">
			  	   	    <input type="hidden" name="formcheck" value="{$formcheck}" > 
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">链接推送token</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="baidu_zz_token"  value="{$configs.baidu_zz_token.value}" placeholder="请输入百度链接推送token"  class="layui-input">
		                     </div>
		                </div>
		               
		               <div class="layui-form-item">
		                     <label class="layui-form-label">熊掌号appid</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="baidu_xzh_appid"  value="{$configs.baidu_xzh_appid.value}" placeholder="请输入百度熊掌号appid"  class="layui-input">
		                     </div>
		               </div>
		               
		               <div class="layui-form-item">
		                     <label class="layui-form-label">熊掌号token</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="baidu_xzh_token"  value="{$configs.baidu_xzh_token.value}" placeholder="请输入百度熊掌号token"  class="layui-input">
		                     </div>
		               </div>
		                
		                <div class="layui-form-item">
							 <div class="layui-input-block">
							    <button class="layui-btn" lay-submit name="submit" value="baidu">立即提交</button>
							    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
							 </div>
						</div>
	              </form>
		  	   </div>
		  	   
		  	   <div class="layui-tab-item">
		  	   	  <form action="{url./admin/Config/index}" method="post" class="layui-form">
		  	   	  	<input type="hidden" name="formcheck" value="{$formcheck}" > 
		  	   		<div class="layui-form-item">
	                     <label class="layui-form-label">API状态</label>
	                     <div class="layui-input-block">
	                     	<input type="radio" name="api_open" value="1" {if(@[$configs.api_open.value]==1)} checked="checked" {/if} title="启用">
							<input type="radio" name="api_open" value="0" {if(@[$configs.api_open.value]==0)} checked="checked" {/if} title="禁用">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
	                     <label class="layui-form-label">API强制认证</label>
	                     <div class="layui-input-block">
	                     	<input type="radio" name="api_auth" value="1" {if(@[$configs.api_auth.value]==1)} checked="checked" {/if} title="启用">
							<input type="radio" name="api_auth" value="0" {if(@[$configs.api_auth.value]==0)} checked="checked" {/if} title="禁用">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
	                      <label class="layui-form-label">API认证用户</label>
	                     <div class="layui-input-inline">
	                     	<input type="text" name="api_appid" value="{$configs.api_appid.value}" placeholder="请输入API认证用户名" class="layui-input">
	                     </div>
	                </div>
	                
	                 <div class="layui-form-item">
	                      <label class="layui-form-label">API认证密钥</label>
	                     <div class="layui-input-inline">
	                     	<input type="password" name="api_secret" value="{$configs.api_secret.value}" placeholder="请输入API认证密钥"  class="layui-input">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
						 <div class="layui-input-block">
						    <button class="layui-btn" lay-submit name="submit" value="api">立即提交</button>
						    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
						 </div>
					</div>
				 </form>
		  	   </div> 
		  	   
		  	    <div class="layui-tab-item">
		  	   	  <form action="{url./admin/Config/index}" method="post" class="layui-form">
		  	   	  	<input type="hidden" name="formcheck" value="{$formcheck}" > 
		  	   		<div class="layui-form-item">
	                     <label class="layui-form-label">状态</label>
	                     <div class="layui-input-block">
	                     	<input type="radio" name="watermark_open" value="1" {if(@[$configs.watermark_open.value]==1)} checked="checked" {/if} title="启用">
							<input type="radio" name="watermark_open" value="0" {if(@[$configs.watermark_open.value]==0)} checked="checked" {/if} title="禁用">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
	                      <label class="layui-form-label">水印文字</label>
	                     <div class="layui-input-inline">
	                     	<input type="text" name="watermark_text" value="{$configs.watermark_text.value}" placeholder="请输入水印文字，如：PbootCMS" class="layui-input">
	                     </div>
	                </div>
					
					<div class="layui-form-item">
	                     <label class="layui-form-label">文字字体</label>
	                     <div class="layui-input-inline">
	                     	<input type="text" name="watermark_text_font" id="watermark_text_font" value="{$configs.watermark_text_font.value}" placeholder="请上传水印文字字体"  class="layui-input">
	                     </div>
	                     <button type="button" class="layui-btn file" data-des="watermark_text_font">
						 	 <i class="layui-icon">&#xe67c;</i>上传字体
						 </button>
	                </div>
	                
	                <div class="layui-form-item">
	                      <label class="layui-form-label">文字大小</label>
	                     <div class="layui-input-inline">
	                     	<input type="text" name="watermark_text_size" value="{$configs.watermark_text_size.value}" placeholder="请输入水印文字大小，如：20" class="layui-input">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
	                      <label class="layui-form-label">文字颜色</label>
	                     <div class="layui-input-inline">
	                     	<input type="text" name="watermark_text_color" value="{$configs.watermark_text_color.value}" placeholder="请输入水印文字颜色，如：100,100,100" class="layui-input">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
	                     <label class="layui-form-label">水印图片</label>
	                     <div class="layui-input-inline">
	                     	<input type="text" name="watermark_pic" id="watermark_pic" value="{$configs.watermark_pic.value}" placeholder="请上传水印图片，优先文字水印"  class="layui-input">
	                     </div>
	                     <button type="button" class="layui-btn upload" data-des="watermark_pic">
						 	 <i class="layui-icon">&#xe67c;</i>上传图片
						 </button>
						 <div id="watermark_pic_box" class="pic"><dl><dt>{if(@[$configs.watermark_pic.value])}<img src="{SITE_DIR}{$configs.watermark_pic.value}" data-url="{$configs.watermark_pic.value}"></dt><dd>删除</dd></dl>{/if}</div>
	                </div>
	                
	                <div class="layui-form-item">
	                     <label class="layui-form-label">水印位置</label>
	                     <div class="layui-input-block">
	                     	<input type="radio" name="watermark_position" value="1" {if(@[$configs.watermark_position.value]==1)} checked="checked" {/if} title="左上">
	                     	<input type="radio" name="watermark_position" value="2" {if(@[$configs.watermark_position.value]==2)} checked="checked" {/if} title="右上">
							<input type="radio" name="watermark_position" value="3" {if(@[$configs.watermark_position.value]==3)} checked="checked" {/if} title="左下">
	                     	<input type="radio" name="watermark_position" value="4" {if(@[$configs.watermark_position.value]==4)} checked="checked" {/if} title="右下">
	                     	<input type="radio" name="watermark_position" value="5" {if(@[$configs.watermark_position.value]==5)} checked="checked" {/if} title="中间">
	                     </div>
	                </div>

	                <div class="layui-form-item">
						 <div class="layui-input-block">
						    <button class="layui-btn" lay-submit name="submit" value="watermark">立即提交</button>
						    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
						 </div>
					</div>
				 </form>
		  	   </div> 
		  	   
		  	    <div class="layui-tab-item">
		  	   	   <form action="{url./admin/Config/index}" method="post" class="layui-form">
			  	   	   <input type="hidden" name="formcheck" value="{$formcheck}" > 
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">后台验证码</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="admin_check_code" value="1" {if([$configs.admin_check_code.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="admin_check_code" value="0" {if([$configs.admin_check_code.value]==0)} checked="checked" {/if} title="禁用">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">留言验证码</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="message_check_code" value="1" {if([$configs.message_check_code.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="message_check_code" value="0" {if([$configs.message_check_code.value]==0)} checked="checked" {/if} title="禁用">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">表单验证码</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="form_check_code" value="1" {if([$configs.form_check_code.value]==1)} checked="checked" {/if} title="启用">
								<input type="radio" name="form_check_code" value="0" {if([$configs.form_check_code.value]==0)} checked="checked" {/if} title="禁用">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">登录失败阀值</label>
		                     <div class="layui-input-inline">
								<input type="text" name="lock_count" value="{$configs.lock_count.value}" placeholder="请输入登录失败几次后锁定IP，默认5次" class="layui-input">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                   <label class="layui-form-label">失败锁定时间</label>
		                   <div class="layui-input-inline">
		                  		<input type="text" name="lock_time" value="{$configs.lock_time.value}" placeholder="请输入登录异常锁定时间，默认为900秒" class="layui-input">
		                   </div>
			            </div>
		                
		                <div class="layui-form-item">
							 <div class="layui-input-block">
							    <button class="layui-btn" lay-submit name="submit" value="security">立即提交</button>
							    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
							 </div>
						</div>
	              </form>
		  	   </div>
		  	   
		  </div>
	 </div>
</div>
{include file='common/foot.html'}
